<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>switch输出星期</title>
</head>
<body>
	<script>
       var week=prompt("请输入数字");
       console.log(typeof week)
       var weekstr="";
       // 多条件的判断 switch
       switch(week){
          case '0':
          	weekstr="日";
          	break;  // 退出
          case '1':
          	weekstr="一";
          	break;
          case '2':
          	weekstr="二";
         	break;
          case '3':
          	weekstr="三";
          	break;
          case '4':
          	weekstr="四";
         	break;
          case '5':
          	weekstr="五";
          	break;
          default:
          	weekstr="六";
       }
       document.write("今天是星期"+weekstr);
	</script>
</body>
</html>